﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MachiningHelper.ToolFile
{
    public class NestSeq
    {
        public string NestSetMillX { get; set; }
        public string NestSetMillY { get; set; }
        public string NestSetMillZ { get; set; }
        public string NestStartOffsetX { get; set; }
        public string NestStartOffsetY { get; set; }
        public string NestDiameter { get; set; }
        public string NestToolName { get; set; }
        public string NestPreviousToolName { get; set; }
        public string NestNextToolName { get; set; }
        public string NestFeedSpeed { get; set; }
        public string NestEntrySpeed { get; set; }
        public string NestBitType { get; set; }
        public string NestRotation { get; set; }
        public string NestToolComp { get; set; }
        public string NestX { get; set; }
        public string NestY { get; set; }
        public string NestZ { get; set; }
        public string NestEndOffsetX { get; set; }
        public string NestEndOffsetY { get; set; }
        public string NestBulge { get; set; }
        public string NestRadius { get; set; }
        public string NestCenterX { get; set; }
        public string NestCenterY { get; set; }
        public string NestNextX { get; set; }
        public string NestNextY { get; set; }
        public string NestPreviousX { get; set; }
        public string NestPreviousY { get; set; }
        public string NestPreviousZ { get; set; }
        public string NestBulgeNext { get; set; }
        public string NestSetMillCounter { get; set; }
        public string NestVectorCounter { get; set; }
        public string NestVectorCount { get; set; }
        public string NestAngle { get; set; }
        public string NestPreviousFeedSpeed { get; set; }
        public static NestSeq LoadSeq(string Line)
        {
            NestSeq ns = new NestSeq();
            var pars = Line.Split(',');
            ns.NestSetMillX = pars[1];
            ns.NestSetMillY = pars[2];
            ns.NestSetMillZ = pars[3];
            ns.NestStartOffsetX = pars[4];
            ns.NestStartOffsetY = pars[5];
            ns.NestDiameter = pars[6];
            ns.NestToolName = pars[7];
            ns.NestPreviousToolName = pars[8];
            ns.NestNextToolName = pars[9];
            ns.NestFeedSpeed = pars[10];
            ns.NestEntrySpeed = pars[11];
            ns.NestBitType = pars[12];
            ns.NestRotation = pars[13];
            ns.NestToolComp = pars[14];
            ns.NestX = pars[15];
            ns.NestY = pars[16];
            ns.NestZ = pars[17];
            ns.NestEndOffsetX = pars[18];
            ns.NestEndOffsetY = pars[19];
            ns.NestBulge = pars[20];
            ns.NestRadius = pars[21];
            ns.NestCenterX = pars[22];
            ns.NestCenterY = pars[23];
            ns.NestNextX = pars[24];
            ns.NestNextY = pars[25];
            ns.NestPreviousX = pars[26];
            ns.NestPreviousY = pars[27];
            ns.NestPreviousZ = pars[28];
            ns.NestBulgeNext = pars[29];
            ns.NestSetMillCounter = pars[30];
            ns.NestVectorCounter = pars[31];
            ns.NestVectorCount = pars[32];
            ns.NestAngle = pars[33];
            ns.NestPreviousFeedSpeed = pars[34];
            return ns;
        }

    }
}
